<template>
  <el-form :model="form" label-width="120px" :rule="rules">
    <el-form-item label="旧密码"  prop="oldPassword" >
      <el-input
          v-model="form.oldPassword"
          type="password"
          placeholder="请输入旧密码"
          show-password
      />
    </el-form-item>
    <el-form-item label="新密码">
      <el-input
          v-model="form.newPassword1"
          type="password"
          placeholder="请输入新密码"
          show-password
      />
    </el-form-item>
    <el-form-item label="确认密码">
      <el-input
          v-model="form.newPassword2"
          type="password"
          placeholder="请确认密码"
          show-password
      />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="submitForm(formRef)">确认</el-button>
      <el-button @click="resetForm(formRef)">重置</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  name: "ChangePassword",
  data() {
    return {
      form: {
        oldPassword: '',
        newPassword1: '',
        newPassword2: '',
      }
    }
  },
  rules:{
    oldPassword:[{
      required: true,
      message: '请填写旧密码',
      trigger: 'blur',
    }
    ]
  }
}
</script>

<style scoped>

</style>
